package com.foreveredu.furedusys.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * 领域模型类：课程章节
 * 
 * @author hushigang
 * 
 */
public class Chapter implements Serializable {

	private static final long serialVersionUID = -7197586570943456046L;
	private int id;
	private String name;// 章节名称
	private int minutes;// 时长（分钟）
	private String vedioFile;// 讲座视频文件
	private Course course;// 所属课程

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@Column
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column
	public int getMinutes() {
		return minutes;
	}

	public void setMinutes(int minutes) {
		this.minutes = minutes;
	}

	@Column
	public String getVedioFile() {
		return vedioFile;
	}

	public void setVedioFile(String vedioFile) {
		this.vedioFile = vedioFile;
	}

	@ManyToOne
	@JoinColumn(name = "course_id")
	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

}
